#ifndef ETUDIANT_H
#define ETUDIANT_H

#include<QVariant>
#include"globalheader.h"
#include"personne.h"

	class Etudiant: public Personne{
	
        private:
            std::string noe_;
			
		public:
        Etudiant(const std::string& noe="",
                const std::string& nom="",
                const std::string& prenom="",
                const std::string& adressePostale="",
                const std::string& adresseElectronique="");
        Etudiant(const Etudiant& etu);
        ~Etudiant();
        bool operator<(const Etudiant& e) const;
        std::string getNoe() const;

        friend QDataStream & operator << (QDataStream & out, const Etudiant & Valeur);
        friend QDataStream & operator >> (QDataStream & in, Etudiant & Valeur);

        static void initEtudiantSystem();

        private :
        QString qnoe;
	};

    Q_DECLARE_METATYPE(Etudiant)
    QDataStream & operator << (QDataStream & out, const Etudiant & Valeur);
    QDataStream & operator >> (QDataStream & in, Etudiant & Valeur);
	
	std::ostream& operator<<(std::ostream& os, const Etudiant& e);

    class ComparatorEtudiant
    {
        bool operator()(const Etudiant& e1, const Etudiant& e2);
    };

    typedef std::set<Etudiant*, point_less<Etudiant> > ensEtudiant;

        class EnsembleEtu
        {
        private:
            ensEtudiant listEtudiant_;

        public:
            EnsembleEtu();
            void ajoutEtudiant(Etudiant* etu);
            void ajoutEnsEtudiant(ensEtudiant eEtu);

            void supprEtudiant(Etudiant* etu);

            ensEtudiant getEnsembleEtu();
        };

#endif
